package com.niiwoo.activity.stage.enums.channel;

/**
 * 渠道类型
 */
public enum ChannleTypeEnum {

    UDCTYPE_ACTIVITY((byte) 0, "活动渠道"),
    UDCTYPE_ADSERVING((byte) 1, "广告投放渠道"),
    UDCTYPE_OFFICIAL((byte) 2, "官方渠道"),
    UDCTYPE_SPEEDAPI((byte) 3, "极速借API渠道"),
    UDCTYPE_THIRDPARTY((byte) 4, "第三方渠道"),
    UDCTYPE_OFFLINE((byte) 5, "线下活动")
    ;

    private Byte type;
    private String description;

    ChannleTypeEnum(Byte type, String description) {
        this.type = type;
        this.description = description;
    }

    public Byte getType() {
        return type;
    }


    public String getDescription() {
        return description;
    }

    public ChannleTypeEnum getChannleType(Byte actionType) {
        for (ChannleTypeEnum e : values()) {
            if (e.getType().equals(actionType)) {
                return e;
            }
        }
        return null;
    }
}
